package com.patrrr.util;

import com.patrrr.Note.NoteEditor;
import com.patrrr.Note.R;
import com.patrrr.Note.R.string;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import android.view.Window;

public class Reminder extends Activity {
	private static final int DIALOG_REMINDER = 0;
	private String mes;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		showDialog(DIALOG_REMINDER);
	}

	@Override
	protected Dialog onCreateDialog(int id, Bundle args) {
		// TODO Auto-generated method stub
		switch (id) {
		case DIALOG_REMINDER:
			return new AlertDialog.Builder(this).setMessage("")
					.setPositiveButton(R.string.known, pListener)
					.setNegativeButton(R.string.view, nListener).create();
		default:
			break;
		}
		return super.onCreateDialog(id, args);
	}

	DialogInterface.OnClickListener pListener = new OnClickListener() {

		@Override
		public void onClick(DialogInterface dialog, int which) {
			// TODO Auto-generated method stub
			dismissDialog(DIALOG_REMINDER);
			finish();
		}
	};
	DialogInterface.OnClickListener nListener = new OnClickListener() {

		@Override
		public void onClick(DialogInterface dialog, int which) {
			// TODO Auto-generated method stub
			Intent i=new Intent(Reminder.this,NoteEditor.class);
			startActivity(i);
		}
	};

}
